package com.tools.scanner.network

import com.tools.scanner.bean.ApiResponse
import com.tools.scanner.bean.AppSettings
import com.tools.scanner.constant.UrlConstant
import retrofit2.Call
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST

interface IServerApi {

    @GET(UrlConstant.GET_SETTING)
    fun getAppSetting(): Call<ApiResponse<AppSettings>>

    @FormUrlEncoded
    @POST(UrlConstant.TRANSLATOR)
    fun translator(
        @Field("sourceCode") sourceCode: String,
        @Field("targetCode") targetCode: String,
        @Field("text") text: String
    ): Call<ApiResponse<List<String>>>

}